package com.fy.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class AppConfig {

    /**
     * 发送人
     */
    @Value("${spring.mail.username:}")
    private String sendUserName;

    public String getSendUserEmail() {
        return sendUserName;
    }

    /**
     * 管理员邮件
     */
    @Value("${admin.emails:}")
    private String adminEmails;
    public String getAdminEmails() {
        return adminEmails;
    }

    /**
     * 阿里云云存储
     */
    @Value("${aliyun.oss.endpoint:}")
    private String endpoint;
    public String getEndPoint() {
        return endpoint;
    }

    @Value("${aliyun.oss.access-key-id:}")
    private String accessKeyId;
    public String getAccessKeyId() {
        return accessKeyId;
    }

    @Value("${aliyun.oss.access-key-secret:}")
    private String accessKeySecret;
    public String getAccessKeySecret() {
        return accessKeySecret;
    }

    @Value("${aliyun.oss.bucket-name:}")
    private String bucketName;
    public String getBucketName() {
        return bucketName;
    }

    /**
     * 获取上传分片的最大值
     */
    @Value("${upload_chunk_size:}")
    private Long upload_chunk_size;
    public Long getUploadChunkSize() {
        return upload_chunk_size;
    }

    /**
     * 户登录过期时间 7200秒
     */
    @Value("${login_out_time:}")
    private int login_out_time;
    public int getLoginOutTime(){
        return login_out_time;
    }
}